<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改')"/>
    <th:block th:include="include :: select2-css"/>
</head>
<body>
<div class="main-content">
    <form id="form-change-edit" class="form-horizontal" AUTOCOMPLETE="OFF">
        <input name="eid" id="eid" type="hidden" th:value="${emp.eid}"/>
        <h4 class="form-header h4">基本信息</h4>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">工号：</label>
                    <div class="col-sm-8">
                        <input th:value="${emp.badge}" class="form-control" readonly="readonly" type="text"/>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">姓名：</label>
                    <div class="col-sm-8">
                        <input th:value="${emp.name}" class="form-control" readonly="readonly" type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">公司名称：</label>
                    <div class="col-sm-8">
                        <input th:value="${emp.compName}" class="form-control" readonly="readonly" type="text"/>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">部门名称：</label>
                    <div class="col-sm-8">
                        <input th:value="${emp.depName}" class="form-control" readonly="readonly" type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">岗位名称：</label>
                    <div class="col-sm-8">
                        <input th:value="${emp.jobName}" class="form-control" readonly="readonly" type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <h4 class="form-header h4">修改信息</h4>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">籍贯：</label>
                    <div class="col-sm-8">
                        <input id="Resident" name="Resident" th:value="${emp.Resident}" class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">政治面貌：</label>
                    <div class="col-sm-8">
                        <select name="Party" id="Party" class="form-control m-b"
                                th:with="type=${@dict.getType('eCD_Party')}">
                            <option value="">请选择</option>
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:selected="${emp.Party+'' == dict.dictValue}"
                                    th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">身份证地址：</label>
                    <div class="col-sm-8">
                        <input id="certaddress" name="certaddress" th:value="${emp.certaddress}" class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">现在住址：</label>
                    <div class="col-sm-8">
                        <input id="Address" name="Address" th:value="${emp.Address}" class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">联系电话：</label>
                    <div class="col-sm-8">
                        <input id="tel" name="tel" th:value="${emp.tel}" class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">座机号：</label>
                    <div class="col-sm-8">
                        <input id="zj" name="zj" th:value="${emp.zj}" class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">短号：</label>
                    <div class="col-sm-8">
                        <input id="dh" name="dh" th:value="${emp.dh}" class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">星座：</label>
                    <div class="col-sm-8">
                        <input id="Constellation" name="Constellation" th:value="${emp.Constellation}" class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">QQ：</label>
                    <div class="col-sm-8">
                        <input id="qq" name="qq" th:value="${emp.qq}" class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">微信：</label>
                    <div class="col-sm-8">
                        <input id="Wechart" name="Wechart" th:value="${emp.Wechart}" class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">是否参军：</label>
                    <div class="col-sm-8">
                        <select id="army" name="army" class="form-control m-b">
                            <option value="">请选择</option>
                            <option value="0" th:selected="${emp.army == 0}">否</option>
                            <option value="1" th:selected="${emp.army == 1}">是</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">退伍部队：</label>
                    <div class="col-sm-8">
                        <input id="leavearmy" name="leavearmy" th:value="${emp.leavearmy}" class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>


<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: datetimepicker-js"/>

<script th:inline="javascript">

    var prefix = ctx + "bgInfo/detailedEmpInfo";

    $(function () {


    });


    function submitHandler() {
        if ($.validate.form()) {
            var data = $("#form-change-edit").serializeArray();
            var eid = $("#eid").val();
            var Resident = $("#Resident").val();
            var Party = $("#Party").val();
            var certaddress = $("#certaddress").val();
            var Address = $("#Address").val();
            var tel = $("#tel").val();
            var zj = $("#zj").val();
            var dh = $("#dh").val();
            var Constellation = $("#Constellation").val();
            var qq = $("#qq").val();
            var Wechart = $("#Wechart").val();
            var army = $("#army").val();
            var leavearmy = $("#leavearmy").val();

            data.push({"name": "eid", "value": eid});
            data.push({"name": "Resident", "value": Resident});
            data.push({"name": "Party", "value": Party});
            data.push({"name": "certaddress", "value": certaddress});
            data.push({"name": "Address", "value": Address});
            data.push({"name": "tel", "value": tel});
            data.push({"name": "zj", "value": zj});
            data.push({"name": "dh", "value": dh});
            data.push({"name": "Constellation", "value": Constellation});
            data.push({"name": "qq", "value": qq});
            data.push({"name": "Wechart", "value": Wechart});
            data.push({"name": "army", "value": army});
            data.push({"name": "leavearmy", "value": leavearmy});
            $.operate.save(prefix + "/edit", data);
        }
    }

</script>
</body>
</html>
